package com.example.canhui01li.myapprxretrofitdagger;

import com.google.gson.annotations.SerializedName;
import com.example.canhui01li.myapprxretrofitdagger.model.BaseInfo;

/**
 * API返回的结果基类
 *
 * @param <T> API中返回的data 字段
 */
public class BaseResultALL implements java.io.Serializable {
    private static final long serialVersionUID = 1L;

    private static final int SUCCESS = 0;

    @SerializedName("code")
    public int code;

    @SerializedName("msg")
    public String msg;

    @SerializedName("data")
    public BaseInfo data;

    public boolean isSuccess() {
        return code == SUCCESS;
    }



}
